<template>
  <ul>
    <li v-for="(l, i) in goods" :key="i">
      <router-link
        :to="{ name: 'good', query: { skuId: l.skuId } }"
        class="box"
      >
        <img :src="l.mainImg" alt="" class="left" />
        <div class="right">
          <h2>{{ l.spuName }}</h2>
          <p>{{ l.spuShortDesc }}</p>
          <span>￥{{ l.price }}</span>
        </div>
      </router-link>
    </li>
  </ul>
</template>

<script>
export default {
  props: {
    goods: Array,
  },
};
</script>

<style lang="scss" scoped>
ul {
  width: 100%;
  padding: 5px;
  li {
    margin-bottom: 15px;
    border-radius: 10px;
    background: #f8f8f8;

    overflow: hidden;
    border-radius: 10px;
    .box {
      text-decoration: neno;
      .left {
        width: 80px;
        height: 80px;
        float: left;
      }
      .right {
        float: left;
        margin-top: 15px;
        h2 {
          font-size: 12px;
          font-weight: bold;
          color: #000;
        }
        p {
          font-size: 12px;
          color: rgba(0, 0, 0, 0.3);
        }
        span {
          font-size: 16px;
          color: red;
        }
      }
    }
  }
}
</style>
